import Vue from 'vue'
import VueRouter from 'vue-router'
import About from '../pages/About'
import Home from '../pages/Home'
import Message from '../pages/Message'
import News from '../pages/News'
Vue.use(VueRouter)
//创建并暴露一个router
export default new VueRouter({
    routes:[
        {
            path:'/about',//路径
            component:About//组件
        },
        {
            path:'/home',//路径
            component:Home,//组件
            children:[
                {
                    path:'message',
                    component:Message,
                },
                {
                    path:'news',
                    component:News,
                }
            ]
        }

    ]
})